.class Lcom/netease/newsreader/activity/ShowComments$39;
.super Landroid/os/AsyncTask;
.source "ShowComments.java"


# annotations
.annotation system Ldalvik/annotation/EnclosingMethod;
    value = Lcom/netease/newsreader/activity/ShowComments;->getMoreBodyWithImg()Ljava/lang/String;
.end annotation

.annotation system Ldalvik/annotation/InnerClass;
    accessFlags = 0x0
    name = null
.end annotation

.annotation system Ldalvik/annotation/Signature;
    value = {
        "Landroid/os/AsyncTask",
        "<",
        "Ljava/lang/String;",
        "Ljava/lang/Void;",
        "Ljava/lang/Boolean;",
        ">;"
    }
.end annotation


# instance fields
.field private imgurl:Ljava/lang/String;

.field final synthetic this$0:Lcom/netease/newsreader/activity/ShowComments;

.field private final synthetic val$imgName:Ljava/lang/String;

.field private final synthetic val$index:I


# direct methods
.method constructor <init>(Lcom/netease/newsreader/activity/ShowComments;Ljava/lang/String;I)V
    .locals 1
    .parameter
    .parameter
    .parameter

    .prologue
    .line 1
    iput-object p1, p0, Lcom/netease/newsreader/activity/ShowComments$39;->this$0:Lcom/netease/newsreader/activity/ShowComments;

    iput-object p2, p0, Lcom/netease/newsreader/activity/ShowComments$39;->val$imgName:Ljava/lang/String;

    iput p3, p0, Lcom/netease/newsreader/activity/ShowComments$39;->val$index:I

    .line 2849
    invoke-direct {p0}, Landroid/os/AsyncTask;-><init>()V

    .line 2851
    const-string v0, ""

    iput-object v0, p0, Lcom/netease/newsreader/activity/ShowComments$39;->imgurl:Ljava/lang/String;

    return-void
.end method


# virtual methods
.method protected varargs doInBackground([Ljava/lang/String;)Ljava/lang/Boolean;
    .locals 8
    .parameter "params"

    .prologue
    .line 2856
    const/4 v3, 0x0

    .line 2858
    .local v3, result:Z
    const/4 v5, 0x0

    aget-object v5, p1, v5

    iput-object v5, p0, Lcom/netease/newsreader/activity/ShowComments$39;->imgurl:Ljava/lang/String;

    .line 2859
    iget-object v5, p0, Lcom/netease/newsreader/activity/ShowComments$39;->imgurl:Ljava/lang/String;

    const-string v6, "_small"

    const-string v7, ""

    invoke-virtual {v5, v6, v7}, Ljava/lang/String;->replace(Ljava/lang/CharSequence;Ljava/lang/CharSequence;)Ljava/lang/String;

    move-result-object v5

    iget-object v6, p0, Lcom/netease/newsreader/activity/ShowComments$39;->this$0:Lcom/netease/newsreader/activity/ShowComments;

    invoke-static {v5, v6}, Lcom/netease/newsreader/util/PicUtil;->getBitMapForStringURL(Ljava/lang/String;Landroid/content/Context;)Landroid/graphics/Bitmap;

    move-result-object v0

    .line 2860
    .local v0, bitmap:Landroid/graphics/Bitmap;
    if-eqz v0, :cond_1

    .line 2861
    iget-object v5, p0, Lcom/netease/newsreader/activity/ShowComments$39;->val$imgName:Ljava/lang/String;

    const-string v6, "_small"

    const-string v7, ""

    invoke-virtual {v5, v6, v7}, Ljava/lang/String;->replace(Ljava/lang/CharSequence;Ljava/lang/CharSequence;)Ljava/lang/String;

    move-result-object v5

    invoke-static {v5, v0}, Lcom/netease/newsreader/util/PicUtil;->saveMyBitmap(Ljava/lang/String;Landroid/graphics/Bitmap;)Z

    .line 2863
    invoke-virtual {v0}, Landroid/graphics/Bitmap;->getWidth()I

    move-result v4

    .line 2864
    .local v4, w:I
    invoke-virtual {v0}, Landroid/graphics/Bitmap;->getHeight()I

    move-result v2

    .line 2865
    .local v2, h:I
    const/4 v1, 0x0

    .line 2866
    .local v1, bm:Landroid/graphics/Bitmap;
    invoke-static {v4, v2}, Ljava/lang/Math;->min(II)I

    move-result v5

    iget-object v6, p0, Lcom/netease/newsreader/activity/ShowComments$39;->this$0:Lcom/netease/newsreader/activity/ShowComments;

    invoke-static {v6}, Lcom/netease/newsreader/activity/ShowComments;->access$116(Lcom/netease/newsreader/activity/ShowComments;)I

    move-result v6

    if-le v5, v6, :cond_3

    .line 2867
    if-le v4, v2, :cond_2

    .line 2868
    iget-object v5, p0, Lcom/netease/newsreader/activity/ShowComments$39;->this$0:Lcom/netease/newsreader/activity/ShowComments;

    invoke-static {v5}, Lcom/netease/newsreader/activity/ShowComments;->access$116(Lcom/netease/newsreader/activity/ShowComments;)I

    move-result v5

    int-to-float v5, v5

    int-to-float v6, v4

    int-to-float v7, v2

    div-float/2addr v6, v7

    mul-float/2addr v5, v6

    float-to-int v4, v5

    .line 2869
    iget-object v5, p0, Lcom/netease/newsreader/activity/ShowComments$39;->this$0:Lcom/netease/newsreader/activity/ShowComments;

    invoke-static {v5}, Lcom/netease/newsreader/activity/ShowComments;->access$116(Lcom/netease/newsreader/activity/ShowComments;)I

    move-result v2

    .line 2874
    :goto_0
    iget-object v5, p0, Lcom/netease/newsreader/activity/ShowComments$39;->this$0:Lcom/netease/newsreader/activity/ShowComments;

    invoke-static {v5, v0, v4, v2}, Lcom/netease/newsreader/util/PicUtil;->resizeBitmap4DetailPage(Landroid/content/Context;Landroid/graphics/Bitmap;II)Landroid/graphics/Bitmap;

    move-result-object v1

    .line 2879
    :goto_1
    iget-object v5, p0, Lcom/netease/newsreader/activity/ShowComments$39;->val$imgName:Ljava/lang/String;

    invoke-static {v5, v1}, Lcom/netease/newsreader/util/PicUtil;->saveMyBitmap(Ljava/lang/String;Landroid/graphics/Bitmap;)Z

    .line 2880
    if-eqz v1, :cond_0

    .line 2881
    invoke-virtual {v1}, Landroid/graphics/Bitmap;->recycle()V

    const/4 v1, 0x0

    .line 2883
    :cond_0
    invoke-virtual {v0}, Landroid/graphics/Bitmap;->recycle()V

    const/4 v0, 0x0

    .line 2884
    const/4 v3, 0x1

    .line 2887
    .end local v1           #bm:Landroid/graphics/Bitmap;
    .end local v2           #h:I
    .end local v4           #w:I
    :cond_1
    invoke-static {v3}, Ljava/lang/Boolean;->valueOf(Z)Ljava/lang/Boolean;

    move-result-object v5

    return-object v5

    .line 2871
    .restart local v1       #bm:Landroid/graphics/Bitmap;
    .restart local v2       #h:I
    .restart local v4       #w:I
    :cond_2
    iget-object v5, p0, Lcom/netease/newsreader/activity/ShowComments$39;->this$0:Lcom/netease/newsreader/activity/ShowComments;

    invoke-static {v5}, Lcom/netease/newsreader/activity/ShowComments;->access$116(Lcom/netease/newsreader/activity/ShowComments;)I

    move-result v5

    int-to-float v5, v5

    int-to-float v6, v2

    int-to-float v7, v4

    div-float/2addr v6, v7

    mul-float/2addr v5, v6

    float-to-int v2, v5

    .line 2872
    iget-object v5, p0, Lcom/netease/newsreader/activity/ShowComments$39;->this$0:Lcom/netease/newsreader/activity/ShowComments;

    invoke-static {v5}, Lcom/netease/newsreader/activity/ShowComments;->access$116(Lcom/netease/newsreader/activity/ShowComments;)I

    move-result v4

    goto :goto_0

    .line 2876
    :cond_3
    const/16 v5, 0x73

    const/16 v6, 0x69

    invoke-static {v0, v5, v6}, Lcom/netease/newsreader/util/PicUtil;->cutBitmap4DetailPage(Landroid/graphics/Bitmap;II)Landroid/graphics/Bitmap;

    move-result-object v1

    goto :goto_1
.end method

.method protected bridge varargs synthetic doInBackground([Ljava/lang/Object;)Ljava/lang/Object;
    .locals 1
    .parameter

    .prologue
    .line 1
    check-cast p1, [Ljava/lang/String;

    invoke-virtual {p0, p1}, Lcom/netease/newsreader/activity/ShowComments$39;->doInBackground([Ljava/lang/String;)Ljava/lang/Boolean;

    move-result-object v0

    return-object v0
.end method

.method protected onPostExecute(Ljava/lang/Boolean;)V
    .locals 5
    .parameter "result"

    .prologue
    .line 2893
    invoke-super {p0, p1}, Landroid/os/AsyncTask;->onPostExecute(Ljava/lang/Object;)V

    .line 2895
    invoke-virtual {p1}, Ljava/lang/Boolean;->booleanValue()Z

    move-result v0

    if-eqz v0, :cond_0

    .line 2896
    iget-object v0, p0, Lcom/netease/newsreader/activity/ShowComments$39;->this$0:Lcom/netease/newsreader/activity/ShowComments;

    invoke-static {v0}, Lcom/netease/newsreader/activity/ShowComments;->access$19(Lcom/netease/newsreader/activity/ShowComments;)Landroid/webkit/WebView;

    move-result-object v0

    new-instance v1, Ljava/lang/StringBuilder;

    const-string v2, "javascript:(function() {$(\'#imgcontent"

    invoke-direct {v1, v2}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    .line 2898
    iget v2, p0, Lcom/netease/newsreader/activity/ShowComments$39;->val$index:I

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;

    move-result-object v1

    .line 2899
    const-string v2, "\').css(\'background-image\',"

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v1

    .line 2900
    const-string v2, "\"url("

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v1

    .line 2901
    sget-object v2, Lcom/netease/newsreader/util/PicUtil;->phototempDir:Ljava/lang/String;

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v1

    .line 2902
    iget-object v2, p0, Lcom/netease/newsreader/activity/ShowComments$39;->val$imgName:Ljava/lang/String;

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v1

    const-string v2, ")\"); })()"

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v1

    invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v1

    .line 2896
    invoke-virtual {v0, v1}, Landroid/webkit/WebView;->loadUrl(Ljava/lang/String;)V

    .line 2914
    :goto_0
    return-void

    .line 2904
    :cond_0
    invoke-static {}, Landroid/webkit/WebView;->enablePlatformNotifications()V

    .line 2905
    iget-object v0, p0, Lcom/netease/newsreader/activity/ShowComments$39;->this$0:Lcom/netease/newsreader/activity/ShowComments;

    invoke-static {v0}, Lcom/netease/newsreader/activity/ShowComments;->access$19(Lcom/netease/newsreader/activity/ShowComments;)Landroid/webkit/WebView;

    move-result-object v0

    const-string v1, "10.0.0.172"

    const-string v2, ""

    const-string v3, ""

    const-string v4, ""

    invoke-virtual {v0, v1, v2, v3, v4}, Landroid/webkit/WebView;->setHttpAuthUsernamePassword(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V

    .line 2906
    iget-object v0, p0, Lcom/netease/newsreader/activity/ShowComments$39;->this$0:Lcom/netease/newsreader/activity/ShowComments;

    invoke-static {v0}, Lcom/netease/newsreader/activity/ShowComments;->access$19(Lcom/netease/newsreader/activity/ShowComments;)Landroid/webkit/WebView;

    move-result-object v0

    new-instance v1, Ljava/lang/StringBuilder;

    const-string v2, "javascript:(function() {$(\'#imgcontent"

    invoke-direct {v1, v2}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    .line 2908
    iget v2, p0, Lcom/netease/newsreader/activity/ShowComments$39;->val$index:I

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;

    move-result-object v1

    .line 2909
    const-string v2, "\').css(\'background-image\',"

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v1

    .line 2910
    const-string v2, "\"url("

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v1

    .line 2911
    iget-object v2, p0, Lcom/netease/newsreader/activity/ShowComments$39;->imgurl:Ljava/lang/String;

    const-string v3, "_small"

    const-string v4, ""

    invoke-virtual {v2, v3, v4}, Ljava/lang/String;->replace(Ljava/lang/CharSequence;Ljava/lang/CharSequence;)Ljava/lang/String;

    move-result-object v2

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v1

    const-string v2, ")\"); })()"

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v1

    invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v1

    .line 2906
    invoke-virtual {v0, v1}, Landroid/webkit/WebView;->loadUrl(Ljava/lang/String;)V

    goto :goto_0
.end method

.method protected bridge synthetic onPostExecute(Ljava/lang/Object;)V
    .locals 0
    .parameter

    .prologue
    .line 1
    check-cast p1, Ljava/lang/Boolean;

    invoke-virtual {p0, p1}, Lcom/netease/newsreader/activity/ShowComments$39;->onPostExecute(Ljava/lang/Boolean;)V

    return-void
.end method
